package com.supcon.exchangedata.repository.slave6;

import com.supcon.exchangedata.pojo.entity.mysql.operation.hj.HjRcwfData;
import com.supcon.exchangedata.pojo.entity.mysql.operation.hj.HjZckcData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface SlaveHjRcwfDataInfo extends JpaRepository<HjRcwfData, String> {
    /**
     * 获取实时数据
     */
    @Transactional
    @Query(nativeQuery = true, value = "SELECT * FROM hj_rcwf_data WHERE biz_time=(SELECT MAX(biz_time) FROM hj_rcwf_data)")
    HjRcwfData acquireRealTimeData();
}
